/**
 * Copyright (C), 2015-2018, XXX有限公司
 * FileName: ArticleDetailService
 * Author:   臧浩鹏
 * Date:     2018/8/4 10:38
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.play.service;

import com.play.mapper.ArticleDetailMapper;
import com.play.model.ArticleDeatil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 〈一句话功能简述〉<br> 
 * 〈〉
 *
 * @author 臧浩鹏
 * @create 2018/8/4
 * @since 1.0.0
 */
@Service
public class ArticleDetailService implements IArticleDetailService {

    @Autowired
    private ArticleDetailMapper articleDetailMapper;

    @Override
    public Integer insertArticleDetailByAId(Integer aid, String detail) {
        Integer res = articleDetailMapper.insert(aid,detail);
        if (res>0){
            //插入成功
            return 1;
        }
        return 0;
    }

    @Override
    public ArticleDeatil selectByAdid(Integer Adid) {
        ArticleDeatil article = articleDetailMapper.selectByAid(Adid);
        return article;
    }
}
